package com.example.eurekaconsumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @title: ProConfig-- 通用配置注册bean 用
 * @projectName spring-cloud-demo
 * @Date: 2021/4/19 8:24
 * @Author: lei.yu-esint
 * @Description:
 */
@Configuration
public class ProConfig {

    @Bean
    @LoadBalanced
    //配置使用eureka
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
